/* 全局样式文件 */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html,
body {
  /* 防止页面滚动 */
  overscroll-behavior: none;
}

html,
body,
#app {
  height: 100%;
  width: 100%;
}

body {
  min-height: 100vh;
  color: var(--xz-fontcolor);
  line-height: 1.6;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--xz-background);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

::selection {
  background: var(--xz-theme);
  color: var(--xz-background);
}

ul,
li,
ol {
  list-style: none;
}

a {
  background-color: transparent;
  color: var(--xz-fontcolor);
  text-decoration: none;
  transition: all 0.3s ease-out 0s;
  overflow-wrap: break-word;
  -webkit-user-drag: none;
}

img {
  max-width: 100%;
  max-height: 100%;
}

button {
  padding: 0;
  outline: 0;
  border: none;
  background: 0 0;
  cursor: pointer;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

button[disabled]:hover {
  opacity: 0.5 !important;
}

.flex {
  display: flex;
}

.flex.ac {
  align-items: center;
}

.flex.jc {
  justify-content: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex.gap1 {
  gap: 1rem;
}

.flex.gap05 {
  gap: 0.5rem;
}

.mr5 {
  margin-right: 5px;
}

.mr6 {
  margin-right: 6px;
}

.mr8 {
  margin-right: 8px;
}

.mr10 {
  margin-right: 10px;
}

.mr12 {
  margin-right: 12px;
}

.mr15 {
  margin-right: 15px;
}

.mr20 {
  margin-right: 20px;
}

.ml5 {
  margin-left: 5px;
}

.ml6 {
  margin-left: 6px;
}

.ml8 {
  margin-left: 8px;
}

.ml10 {
  margin-left: 10px;
}

.ml12 {
  margin-left: 12px;
}

.ml15 {
  margin-left: 15px;
}

.mb5 {
  margin-bottom: 5px;
}

.mb6 {
  margin-bottom: 6px;
}

.mb8 {
  margin-bottom: 8px;
}

.mb10 {
  margin-bottom: 10px;
}

.mb12 {
  margin-bottom: 12px;
}

.mb15 {
  margin-bottom: 15px;
}

.mb20 {
  margin-bottom: 20px;
}

.mt5 {
  margin-top: 5px;
}

.mt6 {
  margin-top: 6px;
}

.mt8 {
  margin-top: 8px;
}

.mt10 {
  margin-top: 10px;
}

.mt12 {
  margin-top: 12px;
}

.mt15 {
  margin-top: 15px;
}

.text {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.btn {
  padding: 0.4rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: var(--this-bg);
  color: var(--xz-white);
  display: inline-block;
  vertical-align: middle;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 400;
  box-shadow: var(--this-shadow);
  line-height: 1.44;
  transition: color 0.2s, background 0.3s, opacity 0.3s, box-shadow 0.3s, transform 0.3s;
  white-space: nowrap;
  text-wrap: nowrap;

  &:hover {
    opacity: 0.75;
  }

  &[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    filter: brightness(0.95);
  }

  &.primary {
    --this-bg: linear-gradient(135deg, #59c3fb 10%, #268df7 100%);
    --this-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  &.danger {
    --this-bg: linear-gradient(135deg, #ff5e7f 30%, #ff967e 100%);
    --this-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  &.warning {
    --this-bg: linear-gradient(135deg, #f59f54 10%, #ff6922 100%);
    --this-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  &.success {
    --this-bg: linear-gradient(135deg, #60e464 10%, #5cb85b 100%);
    --this-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  &.error {
    --this-bg: linear-gradient(135deg, #ff5e7f 30%, #ff967e 100%);
    --this-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }
}

.video-player-box {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 999;
}

.comment-content {
  font-size: 0.825rem;

  img {
    width: 40px;
    height: 40px;
  }
}

@keyframes video-like-active {
  0% {
    transform: scale(1);
    color: var(--xz-white);
  }

  50% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
    color: var(--xz-red);
  }
}

@keyframes video-favorite-active {
  0% {
    transform: scale(1);
    color: var(--xz-white);
  }

  50% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
    color: var(--xz-orange);
  }
}

/* element-plus相关样式 */
.menu-left .el-menu {
  border-right: 0;
}
